package org.spring.node2.trigger.http;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.spring.node2.domain.item.service.ItemService;
import org.spring.node2.domain.item.vo.ItemVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping("/item")
public class ItemController {
    private final ItemService itemService;

    @GetMapping("/query")
    public ItemVO queryUserById(@RequestParam("itemId") Long itemId) {
        return itemService.queryItemById(itemId);
    }
}


